treeview: add the separator style class to the tree view separator lines
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 17 Mar 2011 21:08:41 +0000 (17:08 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 17 Mar 2011 21:12:58 +0000 (17:12 -0400)
gtk/gtktreeview.c

index aefe6f62153c820f4c6a806f6c5cdf58c4d6b8ad..91ee7a5d48a5f7ac9caaec6bff09b0db4e75d43f 100644 (file)
@@ -5122,11 +5122,18 @@ gtk_tree_view_bin_draw (GtkWidget      *widget,
          else
            {
              if (is_separator)
-                gtk_render_line (context, cr,
-                                cell_area.x,
-                                 cell_area.y + cell_area.height / 2,
-                                cell_area.x + cell_area.width,
-                                cell_area.y + cell_area.height / 2);
+                {
+                  gtk_style_context_save (context);
+                  gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
+
+                  gtk_render_line (context, cr,
+                                   cell_area.x,
+                                   cell_area.y + cell_area.height / 2,
+                                   cell_area.x + cell_area.width,
+                                   cell_area.y + cell_area.height / 2);
+
+                  gtk_style_context_restore (context);
+                }
              else
                _gtk_tree_view_column_cell_render (column,
                                                   cr,